package com.yearEndWorkload.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yearEndWorkload.pojo.entity.QueryCall;
import com.yearEndWorkload.pojo.entity.WorkloadLoad;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author admin
* @description 针对表【workload_load(工作量导入表)】的数据库操作Mapper
* @createDate 2024-03-06 22:45:24
* @Entity com.yearEndWorkload.pojo.entity.WorkloadLoad
*/
public interface WorkloadLoadMapper extends BaseMapper<WorkloadLoad> {
    @Select("SELECT teacher_name FROM teacher WHERE teacher_id = #{teacherId}")
    String getTeacherNameById(@Param("teacherId") String teacherId);

    @MapKey("id")
    List<Map<String,Object>> getTeacherYearEndWorkloadWithChild(Page<List<Map<String, Object>>> page,@Param("qu") QueryCall queryCall);

    @MapKey("id")
    List<Map<String,Object>> getTeacherYearEndWorkloadNotChild(Page<List<Map<String, Object>>> page,@Param("qu") QueryCall queryCall);
}




